<?php
namespace app\example\controller;

use app\common\controller\Front;

class Category extends Front
{
    public function _initialize()
    {
        parent::_initialize();
    }
    
    public function index()
    {   
        //查询数据
        $list = model('common/Category','loglic')->select([
            'cache'  => false,
            'result' => 'array',
            'module' => 'example',
            'limit'  => 10,
            'page'   => false,
            'sort'   => 'term_id',
            'order'  => 'desc',
        ]);
        //变量定义
        $this->assign('data',$list);
        //加载模板
        return $this->fetch();
    }
}